mod_perl and mass virtual hosting
am 27.05.2010 21:36:01 von Joshua Johnson--00163641745125816f048798805d
Content-Type: text/plain; charset=ISO-8859-1
Hello all,
I have a question on using mod_perl to configure apache for many virtual
hosts. My problem is the high load on the apache server. I decided to go
with mod_perl to configure apache and here are the reasons (if I should be
doing this a different way, please say so. I'm open to suggestions).:
The company I work at has ~13,000 customer domains. There is a database
where these domains are configured. Some of them are "standard" packages and
simply have a document root where customers upload pages. Some of the
domains make proxy requests to another site. And still others make a proxied
rewrite from "/" to "some random url that is stored in the db". Some
redirect to another url. There are about 20 other such configurations.
I used mod_perl to load all of this up at startup and it worked beautifully.
I originally thought that I would be able to dynamically setup VirtuaHost
sections as requests came in for domains (maybe they were freshly added to
the db or the record updated). But I found you can't really do that so I
have to restart for changes to take effect. Either way, I'm very happy with
how easy and clean mod_perl has made all of this.
But the load on apache runs anywhere from 0.50 to 3.00 on a dual cpu server.
Response doesn't seem slow (except for right after an apache restart) but
I'm worried that I'm doing something fundamentally wrong. There is a
significant amount of proxying going on so I set "ProxyReceiveBufferSize
16384" but that doesn't seem to have changed too much. Could mod_perl be the
cause of the load or would it be the end apache config? Are there any
initial thoughts anyone has? Has anyone run into something similar? Should I
be going about this a different way?
Related: and would it be possible to add config on-the-fly? $r->add_config()
Won't let you add VirtualHosts because it operates as though in a
directive.
I guess I'm just looking for thoughts in general. I've been tinkering with
this for about 2 weeks now.
Thanks,
Josh J
--00163641745125816f048798805d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello all,
I have a question on using mod=
_perl to configure apache for many virtual hosts. My problem is the high lo=
ad on the apache server. I decided to go with mod_perl to configure apache =
and here are the reasons (if I should be doing this a different way, please=
say so. I'm open to suggestions).:
The company I work at has ~13,000 customer domains. There is a database=
where these domains are configured. Some of them are "standard" =
packages and simply have a document root where customers upload pages. Some=
of the domains make proxy requests to another site. And still others make =
a proxied rewrite from "/" to "some random url that is store=
d in the db". Some redirect to another url. There are about 20 other s=
uch configurations.
I used mod_perl to load all of this up at startup and it worked beautif=
ully. I originally thought that I would be able to dynamically setup Virtua=
Host sections as requests came in for domains (maybe they were freshly adde=
d to the db or the record updated). But I found you can't really do tha=
t so I have to restart for changes to take effect. Either way, I'm very=
happy with how easy and clean mod_perl has made all of this.
But the load on apache runs anywhere from 0.50 to 3.00 on a dual cpu se=
rver. Response doesn't seem slow (except for right after an apache rest=
art) but I'm worried that I'm doing something fundamentally wrong. =
There is a significant amount of proxying going on so I set "ProxyRece=
iveBufferSize 16384" but that doesn't seem to have changed too muc=
h. Could mod_perl be the cause of the load or would it be the end apache co=
nfig? Are there any initial thoughts anyone has? Has anyone run into someth=
ing similar? Should I be going about this a different way?
Related: and would it be possible to add config on-the-fly? $r->add_=
config() Won't let you add VirtualHosts because it operates as though i=
n a <Location> directive.
I guess I'm just looking for tho=
ughts in general. I've been tinkering with this for about 2 weeks now.<=
br>
Thanks,
Josh J
--00163641745125816f048798805d--